package presenter.record;

import utils.FileBean;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

//FILE250316-161044F.TS
public class HKFRecImpl implements IRecorder{
    @Override
    public Pattern pattern() {
        return Pattern.compile("FILE(\\d+)-(\\d+)F.TS");
    }

    @Override
    public String rename(FileBean bean, Matcher matcher) {
        String date = matcher.group(1);
        String time = matcher.group(2);
        String toName = String.format("20%s-%s-F.TS", date, time);
        return IRecorder.fixedPath(bean.parent(), toName);
    }
}
